package Test_0817.book;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 * Dare: 2024-08-17
 * Time: 18:30
 */
public class BookShelf {
        //1.最多能放几本书；
    private Book[] books=new Book[10];//最多10本，自己定义大小
        //2.书架目前有几本书；
    private int UseSize;
        //3.书架上有哪些书；
    public BookShelf(){
        this.books[0]=new Book("三国演义","罗贯中","小说",30);
        //记录当前有基本书
        this.UseSize=1;
    }
    public Book[] getBooks() {
        return books;
    }
    //访问下标
    public Book getBook(int pos) {
        return books[pos];
    }
    public void setBooks(int pos,Book book) {
        this.books[pos] = book;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }
    public int getUseSize() {
        return UseSize;
    }
    public void setUseSize(int useSize) {
        UseSize = useSize;
    }
}
